Optimal. Leaf size=207 \[ \frac {2 (b e-a f)^2}{7 f^2 (d e-c f) (e+f x)^{7/2}}-\frac {2 (b e-a f) (b d e-2 b c f+a d f)}{5 f^2 (d e-c f)^2 (e+f x)^{5/2}}+\frac {2 (b c-a d)^2}{3 (d e-c f)^3 (e+f x)^{3/2}}+\frac {2 d (b c-a d)^2}{(d e-c f)^4 \sqrt {e+f x}}-\frac {2 d^{3/2} (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{(d e-c f)^{9/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 207, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {89, 65, 214}
\begin {gather*} -\frac {2 d^{3/2} (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{(d e-c f)^{9/2}}-\frac {2 (b e-a f) (a d f-2 b c f+b d e)}{5 f^2 (e+f x)^{5/2} (d e-c f)^2}+\frac {2 (b e-a f)^2}{7 f^2 (e+f x)^{7/2} (d e-c f)}+\frac {2 d (b c-a d)^2}{\sqrt {e+f x} (d e-c f)^4}+\frac {2 (b c-a d)^2}{3 (e+f x)^{3/2} (d e-c f)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 89
Rule 214
Rubi steps
\begin {align*} \int \frac {(a+b x)^2}{(c+d x) (e+f x)^{9/2}} \, dx &=\int \left (\frac {(-b e+a f)^2}{f (-d e+c f) (e+f x)^{9/2}}+\frac {(-b e+a f) (-b d e+2 b c f-a d f)}{f (-d e+c f)^2 (e+f x)^{7/2}}+\frac {(b c-a d)^2 f}{(-d e+c f)^3 (e+f x)^{5/2}}-\frac {d (-b c+a d)^2 f}{(-d e+c f)^4 (e+f x)^{3/2}}+\frac {d^2 (-b c+a d)^2}{(d e-c f)^4 (c+d x) \sqrt {e+f x}}\right ) \, dx\\ &=\frac {2 (b e-a f)^2}{7 f^2 (d e-c f) (e+f x)^{7/2}}-\frac {2 (b e-a f) (b d e-2 b c f+a d f)}{5 f^2 (d e-c f)^2 (e+f x)^{5/2}}+\frac {2 (b c-a d)^2}{3 (d e-c f)^3 (e+f x)^{3/2}}+\frac {2 d (b c-a d)^2}{(d e-c f)^4 \sqrt {e+f x}}+\frac {\left (d^2 (b c-a d)^2\right ) \int \frac {1}{(c+d x) \sqrt {e+f x}} \, dx}{(d e-c f)^4}\\ &=\frac {2 (b e-a f)^2}{7 f^2 (d e-c f) (e+f x)^{7/2}}-\frac {2 (b e-a f) (b d e-2 b c f+a d f)}{5 f^2 (d e-c f)^2 (e+f x)^{5/2}}+\frac {2 (b c-a d)^2}{3 (d e-c f)^3 (e+f x)^{3/2}}+\frac {2 d (b c-a d)^2}{(d e-c f)^4 \sqrt {e+f x}}+\frac {\left (2 d^2 (b c-a d)^2\right ) \text {Subst}\left (\int \frac {1}{c-\frac {d e}{f}+\frac {d x^2}{f}} \, dx,x,\sqrt {e+f x}\right )}{f (d e-c f)^4}\\ &=\frac {2 (b e-a f)^2}{7 f^2 (d e-c f) (e+f x)^{7/2}}-\frac {2 (b e-a f) (b d e-2 b c f+a d f)}{5 f^2 (d e-c f)^2 (e+f x)^{5/2}}+\frac {2 (b c-a d)^2}{3 (d e-c f)^3 (e+f x)^{3/2}}+\frac {2 d (b c-a d)^2}{(d e-c f)^4 \sqrt {e+f x}}-\frac {2 d^{3/2} (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{(d e-c f)^{9/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.65, size = 378, normalized size = 1.83 \begin {gather*} \frac {-2 b^2 \left (3 d^3 e^4 (2 e+7 f x)-3 c d^2 e^3 f (13 e+28 f x)+c^3 f^3 \left (8 e^2+28 e f x+35 f^2 x^2\right )-5 c^2 d f^2 \left (16 e^3+56 e^2 f x+70 e f^2 x^2+21 f^3 x^3\right )\right )-4 a b f \left (15 d^3 e^4+3 c^3 f^3 (2 e+7 f x)-c^2 d f^2 \left (32 e^2+112 e f x+35 f^2 x^2\right )+c d^2 f \left (116 e^3+406 e^2 f x+350 e f^2 x^2+105 f^3 x^3\right )\right )+2 a^2 f^2 \left (-15 c^3 f^3+3 c^2 d f^2 (22 e+7 f x)-c d^2 f \left (122 e^2+112 e f x+35 f^2 x^2\right )+d^3 \left (176 e^3+406 e^2 f x+350 e f^2 x^2+105 f^3 x^3\right )\right )}{105 f^2 (d e-c f)^4 (e+f x)^{7/2}}+\frac {2 d^{3/2} (b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {-d e+c f}}\right )}{(-d e+c f)^{9/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 258, normalized size = 1.25
method | result | size |
derivativedivides | \(\frac {\frac {2 d^{2} f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (c f -d e \right )^{4} \sqrt {\left (c f -d e \right ) d}}-\frac {2 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}{7 \left (c f -d e \right ) \left (f x +e \right )^{\frac {7}{2}}}-\frac {2 \left (-a^{2} d \,f^{2}+2 a b c \,f^{2}-2 b^{2} c e f +b^{2} d \,e^{2}\right )}{5 \left (c f -d e \right )^{2} \left (f x +e \right )^{\frac {5}{2}}}-\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}{3 \left (c f -d e \right )^{3} \left (f x +e \right )^{\frac {3}{2}}}+\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) d}{\left (c f -d e \right )^{4} \sqrt {f x +e}}}{f^{2}}\) | \(258\) |
default | \(\frac {\frac {2 d^{2} f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d \sqrt {f x +e}}{\sqrt {\left (c f -d e \right ) d}}\right )}{\left (c f -d e \right )^{4} \sqrt {\left (c f -d e \right ) d}}-\frac {2 \left (a^{2} f^{2}-2 a b f e +b^{2} e^{2}\right )}{7 \left (c f -d e \right ) \left (f x +e \right )^{\frac {7}{2}}}-\frac {2 \left (-a^{2} d \,f^{2}+2 a b c \,f^{2}-2 b^{2} c e f +b^{2} d \,e^{2}\right )}{5 \left (c f -d e \right )^{2} \left (f x +e \right )^{\frac {5}{2}}}-\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}{3 \left (c f -d e \right )^{3} \left (f x +e \right )^{\frac {3}{2}}}+\frac {2 f^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) d}{\left (c f -d e \right )^{4} \sqrt {f x +e}}}{f^{2}}\) | \(258\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 895 vs.
\(2 (199) = 398\).
time = 1.40, size = 1804, normalized size = 8.71 \begin {gather*} \left [\frac {105 \, {\left ({\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{6} x^{4} + 4 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{5} x^{3} e + 6 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{4} x^{2} e^{2} + 4 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{3} x e^{3} + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{2} e^{4}\right )} \sqrt {-\frac {d}{c f - d e}} \log \left (\frac {d f x - c f + 2 \, {\left (c f - d e\right )} \sqrt {f x + e} \sqrt {-\frac {d}{c f - d e}} + 2 \, d e}{d x + c}\right ) - 2 \, {\left (15 \, a^{2} c^{3} f^{5} - 105 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{5} x^{3} + 35 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2}\right )} f^{5} x^{2} + 21 \, {\left (2 \, a b c^{3} - a^{2} c^{2} d\right )} f^{5} x + 6 \, b^{2} d^{3} e^{5} + 3 \, {\left (7 \, b^{2} d^{3} f x - {\left (13 \, b^{2} c d^{2} - 10 \, a b d^{3}\right )} f\right )} e^{4} - 4 \, {\left (21 \, b^{2} c d^{2} f^{2} x + 2 \, {\left (10 \, b^{2} c^{2} d - 29 \, a b c d^{2} + 22 \, a^{2} d^{3}\right )} f^{2}\right )} e^{3} - 2 \, {\left (7 \, {\left (20 \, b^{2} c^{2} d - 58 \, a b c d^{2} + 29 \, a^{2} d^{3}\right )} f^{3} x - {\left (4 \, b^{2} c^{3} - 32 \, a b c^{2} d + 61 \, a^{2} c d^{2}\right )} f^{3}\right )} e^{2} - 2 \, {\left (175 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{4} x^{2} - 14 \, {\left (b^{2} c^{3} - 8 \, a b c^{2} d + 4 \, a^{2} c d^{2}\right )} f^{4} x - 3 \, {\left (2 \, a b c^{3} - 11 \, a^{2} c^{2} d\right )} f^{4}\right )} e\right )} \sqrt {f x + e}}{105 \, {\left (c^{4} f^{10} x^{4} + d^{4} f^{2} e^{8} + 4 \, {\left (d^{4} f^{3} x - c d^{3} f^{3}\right )} e^{7} + 2 \, {\left (3 \, d^{4} f^{4} x^{2} - 8 \, c d^{3} f^{4} x + 3 \, c^{2} d^{2} f^{4}\right )} e^{6} + 4 \, {\left (d^{4} f^{5} x^{3} - 6 \, c d^{3} f^{5} x^{2} + 6 \, c^{2} d^{2} f^{5} x - c^{3} d f^{5}\right )} e^{5} + {\left (d^{4} f^{6} x^{4} - 16 \, c d^{3} f^{6} x^{3} + 36 \, c^{2} d^{2} f^{6} x^{2} - 16 \, c^{3} d f^{6} x + c^{4} f^{6}\right )} e^{4} - 4 \, {\left (c d^{3} f^{7} x^{4} - 6 \, c^{2} d^{2} f^{7} x^{3} + 6 \, c^{3} d f^{7} x^{2} - c^{4} f^{7} x\right )} e^{3} + 2 \, {\left (3 \, c^{2} d^{2} f^{8} x^{4} - 8 \, c^{3} d f^{8} x^{3} + 3 \, c^{4} f^{8} x^{2}\right )} e^{2} - 4 \, {\left (c^{3} d f^{9} x^{4} - c^{4} f^{9} x^{3}\right )} e\right )}}, \frac {2 \, {\left (105 \, {\left ({\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{6} x^{4} + 4 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{5} x^{3} e + 6 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{4} x^{2} e^{2} + 4 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{3} x e^{3} + {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{2} e^{4}\right )} \sqrt {\frac {d}{c f - d e}} \arctan \left (-\frac {{\left (c f - d e\right )} \sqrt {f x + e} \sqrt {\frac {d}{c f - d e}}}{d f x + d e}\right ) - {\left (15 \, a^{2} c^{3} f^{5} - 105 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{5} x^{3} + 35 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d + a^{2} c d^{2}\right )} f^{5} x^{2} + 21 \, {\left (2 \, a b c^{3} - a^{2} c^{2} d\right )} f^{5} x + 6 \, b^{2} d^{3} e^{5} + 3 \, {\left (7 \, b^{2} d^{3} f x - {\left (13 \, b^{2} c d^{2} - 10 \, a b d^{3}\right )} f\right )} e^{4} - 4 \, {\left (21 \, b^{2} c d^{2} f^{2} x + 2 \, {\left (10 \, b^{2} c^{2} d - 29 \, a b c d^{2} + 22 \, a^{2} d^{3}\right )} f^{2}\right )} e^{3} - 2 \, {\left (7 \, {\left (20 \, b^{2} c^{2} d - 58 \, a b c d^{2} + 29 \, a^{2} d^{3}\right )} f^{3} x - {\left (4 \, b^{2} c^{3} - 32 \, a b c^{2} d + 61 \, a^{2} c d^{2}\right )} f^{3}\right )} e^{2} - 2 \, {\left (175 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} f^{4} x^{2} - 14 \, {\left (b^{2} c^{3} - 8 \, a b c^{2} d + 4 \, a^{2} c d^{2}\right )} f^{4} x - 3 \, {\left (2 \, a b c^{3} - 11 \, a^{2} c^{2} d\right )} f^{4}\right )} e\right )} \sqrt {f x + e}\right )}}{105 \, {\left (c^{4} f^{10} x^{4} + d^{4} f^{2} e^{8} + 4 \, {\left (d^{4} f^{3} x - c d^{3} f^{3}\right )} e^{7} + 2 \, {\left (3 \, d^{4} f^{4} x^{2} - 8 \, c d^{3} f^{4} x + 3 \, c^{2} d^{2} f^{4}\right )} e^{6} + 4 \, {\left (d^{4} f^{5} x^{3} - 6 \, c d^{3} f^{5} x^{2} + 6 \, c^{2} d^{2} f^{5} x - c^{3} d f^{5}\right )} e^{5} + {\left (d^{4} f^{6} x^{4} - 16 \, c d^{3} f^{6} x^{3} + 36 \, c^{2} d^{2} f^{6} x^{2} - 16 \, c^{3} d f^{6} x + c^{4} f^{6}\right )} e^{4} - 4 \, {\left (c d^{3} f^{7} x^{4} - 6 \, c^{2} d^{2} f^{7} x^{3} + 6 \, c^{3} d f^{7} x^{2} - c^{4} f^{7} x\right )} e^{3} + 2 \, {\left (3 \, c^{2} d^{2} f^{8} x^{4} - 8 \, c^{3} d f^{8} x^{3} + 3 \, c^{4} f^{8} x^{2}\right )} e^{2} - 4 \, {\left (c^{3} d f^{9} x^{4} - c^{4} f^{9} x^{3}\right )} e\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 136.61, size = 189, normalized size = 0.91 \begin {gather*} \frac {2 d \left (a d - b c\right )^{2}}{\sqrt {e + f x} \left (c f - d e\right )^{4}} + \frac {2 d \left (a d - b c\right )^{2} \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{\sqrt {\frac {c f - d e}{d}} \left (c f - d e\right )^{4}} - \frac {2 \left (a d - b c\right )^{2}}{3 \left (e + f x\right )^{\frac {3}{2}} \left (c f - d e\right )^{3}} + \frac {2 \left (a f - b e\right ) \left (a d f - 2 b c f + b d e\right )}{5 f^{2} \left (e + f x\right )^{\frac {5}{2}} \left (c f - d e\right )^{2}} - \frac {2 \left (a f - b e\right )^{2}}{7 f^{2} \left (e + f x\right )^{\frac {7}{2}} \left (c f - d e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 695 vs.
\(2 (199) = 398\).
time = 0.61, size = 695, normalized size = 3.36 \begin {gather*} \frac {2 \, {\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {c d f - d^{2} e}}\right )}{{\left (c^{4} f^{4} - 4 \, c^{3} d f^{3} e + 6 \, c^{2} d^{2} f^{2} e^{2} - 4 \, c d^{3} f e^{3} + d^{4} e^{4}\right )} \sqrt {c d f - d^{2} e}} + \frac {2 \, {\left (105 \, {\left (f x + e\right )}^{3} b^{2} c^{2} d f^{2} - 210 \, {\left (f x + e\right )}^{3} a b c d^{2} f^{2} + 105 \, {\left (f x + e\right )}^{3} a^{2} d^{3} f^{2} - 35 \, {\left (f x + e\right )}^{2} b^{2} c^{3} f^{3} + 70 \, {\left (f x + e\right )}^{2} a b c^{2} d f^{3} - 35 \, {\left (f x + e\right )}^{2} a^{2} c d^{2} f^{3} - 42 \, {\left (f x + e\right )} a b c^{3} f^{4} + 21 \, {\left (f x + e\right )} a^{2} c^{2} d f^{4} - 15 \, a^{2} c^{3} f^{5} + 35 \, {\left (f x + e\right )}^{2} b^{2} c^{2} d f^{2} e - 70 \, {\left (f x + e\right )}^{2} a b c d^{2} f^{2} e + 35 \, {\left (f x + e\right )}^{2} a^{2} d^{3} f^{2} e + 42 \, {\left (f x + e\right )} b^{2} c^{3} f^{3} e + 84 \, {\left (f x + e\right )} a b c^{2} d f^{3} e - 42 \, {\left (f x + e\right )} a^{2} c d^{2} f^{3} e + 30 \, a b c^{3} f^{4} e + 45 \, a^{2} c^{2} d f^{4} e - 105 \, {\left (f x + e\right )} b^{2} c^{2} d f^{2} e^{2} - 42 \, {\left (f x + e\right )} a b c d^{2} f^{2} e^{2} + 21 \, {\left (f x + e\right )} a^{2} d^{3} f^{2} e^{2} - 15 \, b^{2} c^{3} f^{3} e^{2} - 90 \, a b c^{2} d f^{3} e^{2} - 45 \, a^{2} c d^{2} f^{3} e^{2} + 84 \, {\left (f x + e\right )} b^{2} c d^{2} f e^{3} + 45 \, b^{2} c^{2} d f^{2} e^{3} + 90 \, a b c d^{2} f^{2} e^{3} + 15 \, a^{2} d^{3} f^{2} e^{3} - 21 \, {\left (f x + e\right )} b^{2} d^{3} e^{4} - 45 \, b^{2} c d^{2} f e^{4} - 30 \, a b d^{3} f e^{4} + 15 \, b^{2} d^{3} e^{5}\right )}}{105 \, {\left (c^{4} f^{6} - 4 \, c^{3} d f^{5} e + 6 \, c^{2} d^{2} f^{4} e^{2} - 4 \, c d^{3} f^{3} e^{3} + d^{4} f^{2} e^{4}\right )} {\left (f x + e\right )}^{\frac {7}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.47, size = 327, normalized size = 1.58 \begin {gather*} \frac {2\,d^{3/2}\,\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}\,{\left (a\,d-b\,c\right )}^2\,\left (c^4\,f^4-4\,c^3\,d\,e\,f^3+6\,c^2\,d^2\,e^2\,f^2-4\,c\,d^3\,e^3\,f+d^4\,e^4\right )}{{\left (c\,f-d\,e\right )}^{9/2}\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{{\left (c\,f-d\,e\right )}^{9/2}}-\frac {\frac {2\,\left (a^2\,f^2-2\,a\,b\,e\,f+b^2\,e^2\right )}{7\,\left (c\,f-d\,e\right )}+\frac {2\,{\left (e+f\,x\right )}^2\,\left (a^2\,d^2\,f^2-2\,a\,b\,c\,d\,f^2+b^2\,c^2\,f^2\right )}{3\,{\left (c\,f-d\,e\right )}^3}-\frac {2\,\left (e+f\,x\right )\,\left (d\,a^2\,f^2-2\,c\,a\,b\,f^2-d\,b^2\,e^2+2\,c\,b^2\,e\,f\right )}{5\,{\left (c\,f-d\,e\right )}^2}-\frac {2\,d\,{\left (e+f\,x\right )}^3\,\left (a^2\,d^2\,f^2-2\,a\,b\,c\,d\,f^2+b^2\,c^2\,f^2\right )}{{\left (c\,f-d\,e\right )}^4}}{f^2\,{\left (e+f\,x\right )}^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________